package com.java.side.fegin.controller;


import com.java.side.fegin.server.UserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private UserClient userClient;


    @GetMapping("/test/user")
    public String getUserName() throws InterruptedException {
        return "huha";
    }


    @GetMapping("/test/feign")
    public String testFegin(){
        String userName = userClient.getUserName();
        System.out.println(userName);
        return "success";
    }
}
